import fetch from '@/utils/request'

/**
 * Permission service
 */
const Permission = {
	get: () => fetch.request({
		url: '/api/user/permission/get',
		method: 'POST'
	}),
	hasRole: (role) => fetch.request({
		url: '/api/user/permission/has_role',
		method: 'POST',
		data: {
			role: role
		}
	}),
	hasPermission: (permission) => fetch.request({
		url: '/api/user/permission/has_permission',
		method: 'POST',
		data: {
			permission: permission
		}
	}),
};

export default Permission
